package com.huang.controller;

import com.huang.common.utils.SpringUtils;
import com.huang.entity.AreaTask;
import com.huang.mapper.AreaTaskMapper;
import com.huang.service.AreaTaskService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 黄自祥
 * @date 2022/01/15 14:18
 * @Description:
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Resource
    AreaTaskMapper areaTaskMapper;
    @Resource
    AreaTaskService areaTaskService;

    @RequestMapping("/areaTaskServiceTest")
    public String areaTaskServiceTest(){
        AreaTask s = areaTaskMapper.selectById(1);
        System.out.println(areaTaskService.getById(2));
        return s.toString();
    }

    @RequestMapping("/getBean")
    public void getBean(String beanName){
        Object bean = SpringUtils.getBean(beanName);
        System.out.println(bean);
    }

}
